diff --git a/swh/web/ui/templates/api-endpoints.html b/swh/web/ui/templates/api-endpoints.html index 0e588d10..12e82598 100644 --- a/swh/web/ui/templates/api-endpoints.html +++ b/swh/web/ui/templates/api-endpoints.html @@ -1,61 +1,62 @@ {% extends "layout.html" %} -{% block title %}API endpoints{% endblock %} +{% block title %} Software Heritage API – Endpoints {% endblock %} {% block content %}
- This lists the current API endpoints for version 1. For a more general description, please refer - to the main documentation. + Below you can find a list of available and upcoming endpoints for version 1 + of the Software Heritage API. For a more general introduction please refer to + the API overview.
{% for route, doc in doc_routes %} {% if 'tags' in doc and doc['tags'] is not none %} {% else %} {% endif %} {% endfor %}
Route Status Description
{{ route }} {{ ', '.join(doc['tags']) }}{{ route }} opened{{ doc['docstring'] | safe_docstring_display | safe }}
{% endblock %} diff --git a/swh/web/ui/templates/api.html b/swh/web/ui/templates/api.html index 12236a5c..aea67036 100644 --- a/swh/web/ui/templates/api.html +++ b/swh/web/ui/templates/api.html @@ -1,8 +1,8 @@ {% extends "layout.html" %} -{% block title %}API Documentation{% endblock %} +{% block title %} Software Heritage API – Overview {% endblock %} {% block content %}
{% include 'includes/apidoc-header.html' %}
{% endblock %} diff --git a/swh/web/ui/templates/apidoc.html b/swh/web/ui/templates/apidoc.html index b543f456..864a8a46 100644 --- a/swh/web/ui/templates/apidoc.html +++ b/swh/web/ui/templates/apidoc.html @@ -1,123 +1,123 @@ {% extends "layout.html" %} -{% block title %} API overview {% endblock %} +{% block title %} Software Heritage API – {{ route }} {% endblock %} {% block content %} {% if docstring %}

Description

{{ docstring | safe_docstring_display | safe }}
{% endif %} {% if response_data and response_data is not none %}

Request

{{ request.method }} {{ request.url }}
{% if headers_data and headers_data is not none %}

Headers

{% for header_name, header_value in headers_data.items() %}
{{ header_name }} {{ header_value | urlize_header_links | safe }}
{% endfor %} {% endif %}

Result

{{ response_data | urlize_api_links | safe }}
{% endif %}
{% for url in urls %} {% endfor %}
URL Allowed Methods
{{ url['rule'] }} {{ url['methods'] | sort | join(', ') }}

{% if args and args|length > 0 %}

Args

{% for arg in args %}
{{ arg['name'] }}: {{ arg['type'] }}
{{ arg['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if params and params|length > 0 %}

Params

{% for param in params %}
{{ param['name'] }}: string
{{ param['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if excs and excs|length > 0 %}

Raises

{% for exc in excs %}
{{ exc['exc'] }}
{{ exc['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if headers %}

Headers

{% for header in headers %}
{{ header['name'] }}: string
{{ header['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if return %}

Returns

{{ return['type'] }}
{{ return['doc'] | safe_docstring_display | safe }}
{% endif %} {% if examples %}

Examples

{% for example in examples %}
{{ example }}
{% endfor %}
{% endif %} {% endblock %} diff --git a/swh/web/ui/templates/layout.html b/swh/web/ui/templates/layout.html index 5eb89f24..cba035c1 100644 --- a/swh/web/ui/templates/layout.html +++ b/swh/web/ui/templates/layout.html @@ -1,80 +1,80 @@ - {% block title %}{% endblock %} - The Software Heritage Archive + {% block title %}{% endblock %}

{{ self.title() }}

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
{% for category, message in messages %} {% endfor %}
{% endif %} {% endwith %}
{% block content %}{% endblock %}
back to top